//
//  StrategyNearbyPhotoParser.m
//  ITrip
//
//  Created by dllo on 15/6/1.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "StrategyNearbyPhotoParser.h"

@implementation StrategyNearbyPhotoParser

+ (NSMutableArray *)getParser:(NSData *)data
{
    NSMutableArray *arrayData = [NSMutableArray array];
    NSArray *array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
    for (NSDictionary *dic in array) {
        StrategyNearbyPhotoModel *model = [StrategyNearbyPhotoModel getNearbyPhotoModel];
        model.photo_id = [[dic objectForKey:@"id"]integerValue];
        model.photo_image_height = [[dic objectForKey:@"image_height"]integerValue];
        model.photo_image_url = [dic objectForKey:@"image_url"];
        model.photo_image_width = [[dic objectForKey:@"image_width"]integerValue];
        model.photo_trip_name = [dic objectForKey:@"trip_name"];
        [arrayData addObject:model];
    }
//    NSLog(@"%@", arrayData);
    return arrayData;
}

@end
